require 'rake'
require 'rake/testtask'

ENV["TM_SUPPORT_PATH"] = '/Applications/TextMate.app/Contents/SharedSupport/Support'
ENV["EVRL_DISABLE_BENCHMARK_MESSAGE"] = 'true'

# The default task is run if rake is given no explicit arguments.

desc "Default Task"
task :default => :test

Rake::TestTask.new(:test) do |t|
  t.test_files = FileList['test/**/*test.rb']
  t.warning = true
  t.verbose = true
end

Rake::TestTask.new(:test_units) do |t|
  t.test_files = FileList['test/units/**/*test.rb']
  t.warning = true
  t.verbose = false
end

Rake::TestTask.new(:test_functional) do |t|
  t.test_files = FileList['test/functional/**/*test.rb']
  t.warning = true
  t.warning = true
end

require 'rcov/rcovtask'

Rcov::RcovTask.new(:courage) do |t|
  t.libs << "test"
  t.rcov_opts = ['-xRakefile', '-xenv.rb', '-xSharedSupport', '--text-report']
  t.test_files = FileList[ 'test/**/*test.rb' ]
  t.verbose = true
end